<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>(abstraction-rtos)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="logo.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">(abstraction-rtos)</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__group__abstraction__rtos__timer.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a>  </div>
  <div class="headertitle"><div class="title">Timer</div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p >APIs for creating and working with Timers. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga92b29af1c848137e18dec1ae1cb5ffec"><td class="memItemLeft" align="right" valign="top"><a id="ga92b29af1c848137e18dec1ae1cb5ffec" name="ga92b29af1c848137e18dec1ae1cb5ffec"></a>
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><b>cy_timer_callback_t</b>) (<a class="el" href="group__group__abstraction__rtos__port.html#gaae8f42a65f808106d77113794ab7dd30">cy_timer_callback_arg_t</a> arg)</td></tr>
<tr class="memdesc:ga92b29af1c848137e18dec1ae1cb5ffec"><td class="mdescLeft">&#160;</td><td class="mdescRight">The callback function to be called by a timer. <br /></td></tr>
<tr class="separator:ga92b29af1c848137e18dec1ae1cb5ffec"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga0606aecc2c90e9315f7da5e3daa3ffc1"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__abstraction__rtos__timer.html#ga0606aecc2c90e9315f7da5e3daa3ffc1">cy_timer_trigger_type_t</a> { <br />
&#160;&#160;<a class="el" href="group__group__abstraction__rtos__timer.html#gga0606aecc2c90e9315f7da5e3daa3ffc1af7a191ed0c1879be4d0840a166299839">CY_TIMER_TYPE_PERIODIC</a>
, <br />
&#160;&#160;<a class="el" href="group__group__abstraction__rtos__timer.html#gga0606aecc2c90e9315f7da5e3daa3ffc1af554aa26a56ebee9da223be7c1f9d0e1">CY_TIMER_TYPE_ONCE</a>
<br />
 }</td></tr>
<tr class="memdesc:ga0606aecc2c90e9315f7da5e3daa3ffc1"><td class="mdescLeft">&#160;</td><td class="mdescRight">The type of timer.  <a href="group__group__abstraction__rtos__timer.html#ga0606aecc2c90e9315f7da5e3daa3ffc1">More...</a><br /></td></tr>
<tr class="separator:ga0606aecc2c90e9315f7da5e3daa3ffc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4d679d61e091ef8abf70d95bc1496c91"><td class="memItemLeft" align="right" valign="top">cy_rslt_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__abstraction__rtos__timer.html#ga4d679d61e091ef8abf70d95bc1496c91">cy_rtos_timer_init</a> (<a class="el" href="group__group__abstraction__rtos__port.html#gacf9d99e8262de333b482417053756624">cy_timer_t</a> *timer, <a class="el" href="group__group__abstraction__rtos__timer.html#ga0606aecc2c90e9315f7da5e3daa3ffc1">cy_timer_trigger_type_t</a> type, <a class="el" href="group__group__abstraction__rtos__timer.html#ga92b29af1c848137e18dec1ae1cb5ffec">cy_timer_callback_t</a> fun, <a class="el" href="group__group__abstraction__rtos__port.html#gaae8f42a65f808106d77113794ab7dd30">cy_timer_callback_arg_t</a> arg)</td></tr>
<tr class="memdesc:ga4d679d61e091ef8abf70d95bc1496c91"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new timer.  <a href="group__group__abstraction__rtos__timer.html#ga4d679d61e091ef8abf70d95bc1496c91">More...</a><br /></td></tr>
<tr class="separator:ga4d679d61e091ef8abf70d95bc1496c91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga978c045f4f7bd1bc2dda5039426b2475"><td class="memItemLeft" align="right" valign="top">cy_rslt_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__abstraction__rtos__timer.html#ga978c045f4f7bd1bc2dda5039426b2475">cy_rtos_timer_start</a> (<a class="el" href="group__group__abstraction__rtos__port.html#gacf9d99e8262de333b482417053756624">cy_timer_t</a> *timer, <a class="el" href="group__group__abstraction__rtos__port.html#ga141349b315f2266d5e0e8b8566eb608b">cy_time_t</a> num_ms)</td></tr>
<tr class="memdesc:ga978c045f4f7bd1bc2dda5039426b2475"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a request to start the timer.  <a href="group__group__abstraction__rtos__timer.html#ga978c045f4f7bd1bc2dda5039426b2475">More...</a><br /></td></tr>
<tr class="separator:ga978c045f4f7bd1bc2dda5039426b2475"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab7aac5b6be6876806aed8e18f43ccc7f"><td class="memItemLeft" align="right" valign="top">cy_rslt_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__abstraction__rtos__timer.html#gab7aac5b6be6876806aed8e18f43ccc7f">cy_rtos_timer_stop</a> (<a class="el" href="group__group__abstraction__rtos__port.html#gacf9d99e8262de333b482417053756624">cy_timer_t</a> *timer)</td></tr>
<tr class="memdesc:gab7aac5b6be6876806aed8e18f43ccc7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a request to stop the timer.  <a href="group__group__abstraction__rtos__timer.html#gab7aac5b6be6876806aed8e18f43ccc7f">More...</a><br /></td></tr>
<tr class="separator:gab7aac5b6be6876806aed8e18f43ccc7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7bf456853b8b353bf19977381377322b"><td class="memItemLeft" align="right" valign="top">cy_rslt_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__abstraction__rtos__timer.html#ga7bf456853b8b353bf19977381377322b">cy_rtos_timer_is_running</a> (<a class="el" href="group__group__abstraction__rtos__port.html#gacf9d99e8262de333b482417053756624">cy_timer_t</a> *timer, bool *state)</td></tr>
<tr class="memdesc:ga7bf456853b8b353bf19977381377322b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns state of a timer.  <a href="group__group__abstraction__rtos__timer.html#ga7bf456853b8b353bf19977381377322b">More...</a><br /></td></tr>
<tr class="separator:ga7bf456853b8b353bf19977381377322b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1c9db37ed530cce390d282e224d3b1bf"><td class="memItemLeft" align="right" valign="top">cy_rslt_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__abstraction__rtos__timer.html#ga1c9db37ed530cce390d282e224d3b1bf">cy_rtos_timer_deinit</a> (<a class="el" href="group__group__abstraction__rtos__port.html#gacf9d99e8262de333b482417053756624">cy_timer_t</a> *timer)</td></tr>
<tr class="memdesc:ga1c9db37ed530cce390d282e224d3b1bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deinit the timer.  <a href="group__group__abstraction__rtos__timer.html#ga1c9db37ed530cce390d282e224d3b1bf">More...</a><br /></td></tr>
<tr class="separator:ga1c9db37ed530cce390d282e224d3b1bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae0634f5811ce7d7fff6e9aa7fc4a35dd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__abstraction__rtos__timer.html#gae0634f5811ce7d7fff6e9aa7fc4a35dd">cy_rtos_init_timer</a>(timer,  type,  fun,  arg)&#160;&#160;&#160;    <a class="el" href="group__group__abstraction__rtos__timer.html#ga4d679d61e091ef8abf70d95bc1496c91">cy_rtos_timer_init</a>(timer, type, fun, arg)</td></tr>
<tr class="memdesc:gae0634f5811ce7d7fff6e9aa7fc4a35dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new timer.  <a href="group__group__abstraction__rtos__timer.html#gae0634f5811ce7d7fff6e9aa7fc4a35dd">More...</a><br /></td></tr>
<tr class="separator:gae0634f5811ce7d7fff6e9aa7fc4a35dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga301364ce1436e199f4287fea6babedb9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__abstraction__rtos__timer.html#ga301364ce1436e199f4287fea6babedb9">cy_rtos_start_timer</a>(timer,  num_ms)&#160;&#160;&#160;    <a class="el" href="group__group__abstraction__rtos__timer.html#ga978c045f4f7bd1bc2dda5039426b2475">cy_rtos_timer_start</a>(timer, num_ms)</td></tr>
<tr class="memdesc:ga301364ce1436e199f4287fea6babedb9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a request to start the timer.  <a href="group__group__abstraction__rtos__timer.html#ga301364ce1436e199f4287fea6babedb9">More...</a><br /></td></tr>
<tr class="separator:ga301364ce1436e199f4287fea6babedb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga633bb9ee0729d1dd87da4bfa0c874c23"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__abstraction__rtos__timer.html#ga633bb9ee0729d1dd87da4bfa0c874c23">cy_rtos_stop_timer</a>(timer)&#160;&#160;&#160;<a class="el" href="group__group__abstraction__rtos__timer.html#gab7aac5b6be6876806aed8e18f43ccc7f">cy_rtos_timer_stop</a>(timer)</td></tr>
<tr class="memdesc:ga633bb9ee0729d1dd87da4bfa0c874c23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a request to stop the timer.  <a href="group__group__abstraction__rtos__timer.html#ga633bb9ee0729d1dd87da4bfa0c874c23">More...</a><br /></td></tr>
<tr class="separator:ga633bb9ee0729d1dd87da4bfa0c874c23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3583611b63961c65a1bee5291ace6fbf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__abstraction__rtos__timer.html#ga3583611b63961c65a1bee5291ace6fbf">cy_rtos_is_running_timer</a>(timer,  state)&#160;&#160;&#160;    <a class="el" href="group__group__abstraction__rtos__timer.html#ga7bf456853b8b353bf19977381377322b">cy_rtos_timer_is_running</a>(timer, state)</td></tr>
<tr class="memdesc:ga3583611b63961c65a1bee5291ace6fbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns state of a timer.  <a href="group__group__abstraction__rtos__timer.html#ga3583611b63961c65a1bee5291ace6fbf">More...</a><br /></td></tr>
<tr class="separator:ga3583611b63961c65a1bee5291ace6fbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9fa3d4fd5d73445a40f4dffd263d734e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__abstraction__rtos__timer.html#ga9fa3d4fd5d73445a40f4dffd263d734e">cy_rtos_deinit_timer</a>(timer)&#160;&#160;&#160;<a class="el" href="group__group__abstraction__rtos__timer.html#ga1c9db37ed530cce390d282e224d3b1bf">cy_rtos_timer_deinit</a>(timer)</td></tr>
<tr class="memdesc:ga9fa3d4fd5d73445a40f4dffd263d734e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deinit the timer.  <a href="group__group__abstraction__rtos__timer.html#ga9fa3d4fd5d73445a40f4dffd263d734e">More...</a><br /></td></tr>
<tr class="separator:ga9fa3d4fd5d73445a40f4dffd263d734e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="gae0634f5811ce7d7fff6e9aa7fc4a35dd" name="gae0634f5811ce7d7fff6e9aa7fc4a35dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae0634f5811ce7d7fff6e9aa7fc4a35dd">&#9670;&nbsp;</a></span>cy_rtos_init_timer</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cy_rtos_init_timer</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">timer, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">fun, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">arg&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;    <a class="el" href="group__group__abstraction__rtos__timer.html#ga4d679d61e091ef8abf70d95bc1496c91">cy_rtos_timer_init</a>(timer, type, fun, arg)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new timer. </p>
<p >This function initializes a timer object. </p><dl class="section note"><dt>Note</dt><dd>The timer is not active until start is called. </dd>
<dd>
The callback may be (likely will be) called from a different thread.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">timer</td><td>Pointer to the timer handle to initialize </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>Type of timer (periodic or once) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>The function </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>Argument to pass along to the callback function</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the init request. [<a class="el" href="group__group__abstraction__rtos__common.html#gaf58fac450d9fff4472f03ad68f6e546e">CY_RSLT_SUCCESS</a>, <a class="el" href="group__group__abstraction__rtos__common.html#ga89a0a071bd7a41b5d1f3edb969ee1647">CY_RTOS_GENERAL_ERROR</a>] </dd></dl>

</div>
</div>
<a id="ga301364ce1436e199f4287fea6babedb9" name="ga301364ce1436e199f4287fea6babedb9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga301364ce1436e199f4287fea6babedb9">&#9670;&nbsp;</a></span>cy_rtos_start_timer</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cy_rtos_start_timer</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">timer, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">num_ms&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;    <a class="el" href="group__group__abstraction__rtos__timer.html#ga978c045f4f7bd1bc2dda5039426b2475">cy_rtos_timer_start</a>(timer, num_ms)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a request to start the timer. </p>
<p >Depending on the priorities of threads in the system, it may be necessary for high priority items to wait before the timer actually starts running.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">timer</td><td>Pointer to the timer handle </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_ms</td><td>The number of milliseconds to wait before the timer fires</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the start request. [<a class="el" href="group__group__abstraction__rtos__common.html#gaf58fac450d9fff4472f03ad68f6e546e">CY_RSLT_SUCCESS</a>, <a class="el" href="group__group__abstraction__rtos__common.html#ga89a0a071bd7a41b5d1f3edb969ee1647">CY_RTOS_GENERAL_ERROR</a>] </dd></dl>

</div>
</div>
<a id="ga633bb9ee0729d1dd87da4bfa0c874c23" name="ga633bb9ee0729d1dd87da4bfa0c874c23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga633bb9ee0729d1dd87da4bfa0c874c23">&#9670;&nbsp;</a></span>cy_rtos_stop_timer</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cy_rtos_stop_timer</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">timer</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="group__group__abstraction__rtos__timer.html#gab7aac5b6be6876806aed8e18f43ccc7f">cy_rtos_timer_stop</a>(timer)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a request to stop the timer. </p>
<p >Depending on the priorities of threads in the system, it may be necessary for high priority items to wait before the timer is actually stopped.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">timer</td><td>Pointer to the timer handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the stop request. [<a class="el" href="group__group__abstraction__rtos__common.html#gaf58fac450d9fff4472f03ad68f6e546e">CY_RSLT_SUCCESS</a>, <a class="el" href="group__group__abstraction__rtos__common.html#ga89a0a071bd7a41b5d1f3edb969ee1647">CY_RTOS_GENERAL_ERROR</a>] </dd></dl>

</div>
</div>
<a id="ga3583611b63961c65a1bee5291ace6fbf" name="ga3583611b63961c65a1bee5291ace6fbf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3583611b63961c65a1bee5291ace6fbf">&#9670;&nbsp;</a></span>cy_rtos_is_running_timer</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cy_rtos_is_running_timer</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">timer, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">state&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;    <a class="el" href="group__group__abstraction__rtos__timer.html#ga7bf456853b8b353bf19977381377322b">cy_rtos_timer_is_running</a>(timer, state)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns state of a timer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">timer</td><td>Pointer to the timer handle </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">state</td><td>Return value for state, true if running, false otherwise</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the is_running request. [<a class="el" href="group__group__abstraction__rtos__common.html#gaf58fac450d9fff4472f03ad68f6e546e">CY_RSLT_SUCCESS</a>, <a class="el" href="group__group__abstraction__rtos__common.html#ga89a0a071bd7a41b5d1f3edb969ee1647">CY_RTOS_GENERAL_ERROR</a>] </dd></dl>

</div>
</div>
<a id="ga9fa3d4fd5d73445a40f4dffd263d734e" name="ga9fa3d4fd5d73445a40f4dffd263d734e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9fa3d4fd5d73445a40f4dffd263d734e">&#9670;&nbsp;</a></span>cy_rtos_deinit_timer</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cy_rtos_deinit_timer</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">timer</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="group__group__abstraction__rtos__timer.html#ga1c9db37ed530cce390d282e224d3b1bf">cy_rtos_timer_deinit</a>(timer)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Deinit the timer. </p>
<p >This function deinitializes the timer and frees all consumed resources.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">timer</td><td>Pointer to the timer handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the deinit request. [<a class="el" href="group__group__abstraction__rtos__common.html#gaf58fac450d9fff4472f03ad68f6e546e">CY_RSLT_SUCCESS</a>, <a class="el" href="group__group__abstraction__rtos__common.html#ga89a0a071bd7a41b5d1f3edb969ee1647">CY_RTOS_GENERAL_ERROR</a>] </dd></dl>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga0606aecc2c90e9315f7da5e3daa3ffc1" name="ga0606aecc2c90e9315f7da5e3daa3ffc1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0606aecc2c90e9315f7da5e3daa3ffc1">&#9670;&nbsp;</a></span>cy_timer_trigger_type_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__group__abstraction__rtos__timer.html#ga0606aecc2c90e9315f7da5e3daa3ffc1">cy_timer_trigger_type_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The type of timer. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga0606aecc2c90e9315f7da5e3daa3ffc1af7a191ed0c1879be4d0840a166299839" name="gga0606aecc2c90e9315f7da5e3daa3ffc1af7a191ed0c1879be4d0840a166299839"></a>CY_TIMER_TYPE_PERIODIC&#160;</td><td class="fielddoc"><p >called periodically until stopped </p>
</td></tr>
<tr><td class="fieldname"><a id="gga0606aecc2c90e9315f7da5e3daa3ffc1af554aa26a56ebee9da223be7c1f9d0e1" name="gga0606aecc2c90e9315f7da5e3daa3ffc1af554aa26a56ebee9da223be7c1f9d0e1"></a>CY_TIMER_TYPE_ONCE&#160;</td><td class="fielddoc"><p >called once only </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga4d679d61e091ef8abf70d95bc1496c91" name="ga4d679d61e091ef8abf70d95bc1496c91"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4d679d61e091ef8abf70d95bc1496c91">&#9670;&nbsp;</a></span>cy_rtos_timer_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cy_rslt_t cy_rtos_timer_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__abstraction__rtos__port.html#gacf9d99e8262de333b482417053756624">cy_timer_t</a> *&#160;</td>
          <td class="paramname"><em>timer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__abstraction__rtos__timer.html#ga0606aecc2c90e9315f7da5e3daa3ffc1">cy_timer_trigger_type_t</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__abstraction__rtos__timer.html#ga92b29af1c848137e18dec1ae1cb5ffec">cy_timer_callback_t</a>&#160;</td>
          <td class="paramname"><em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__abstraction__rtos__port.html#gaae8f42a65f808106d77113794ab7dd30">cy_timer_callback_arg_t</a>&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new timer. </p>
<p >This function initializes a timer object. </p><dl class="section note"><dt>Note</dt><dd>The timer is not active until start is called. </dd>
<dd>
The callback may be (likely will be) called from a different thread.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">timer</td><td>Pointer to the timer handle to initialize </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>Type of timer (periodic or once) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fun</td><td>The function </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>Argument to pass along to the callback function</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the init request. [<a class="el" href="group__group__abstraction__rtos__common.html#gaf58fac450d9fff4472f03ad68f6e546e">CY_RSLT_SUCCESS</a>, <a class="el" href="group__group__abstraction__rtos__common.html#ga89a0a071bd7a41b5d1f3edb969ee1647">CY_RTOS_GENERAL_ERROR</a>] </dd></dl>

</div>
</div>
<a id="ga978c045f4f7bd1bc2dda5039426b2475" name="ga978c045f4f7bd1bc2dda5039426b2475"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga978c045f4f7bd1bc2dda5039426b2475">&#9670;&nbsp;</a></span>cy_rtos_timer_start()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cy_rslt_t cy_rtos_timer_start </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__abstraction__rtos__port.html#gacf9d99e8262de333b482417053756624">cy_timer_t</a> *&#160;</td>
          <td class="paramname"><em>timer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__abstraction__rtos__port.html#ga141349b315f2266d5e0e8b8566eb608b">cy_time_t</a>&#160;</td>
          <td class="paramname"><em>num_ms</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a request to start the timer. </p>
<p >Depending on the priorities of threads in the system, it may be necessary for high priority items to wait before the timer actually starts running.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">timer</td><td>Pointer to the timer handle </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_ms</td><td>The number of milliseconds to wait before the timer fires</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the start request. [<a class="el" href="group__group__abstraction__rtos__common.html#gaf58fac450d9fff4472f03ad68f6e546e">CY_RSLT_SUCCESS</a>, <a class="el" href="group__group__abstraction__rtos__common.html#ga89a0a071bd7a41b5d1f3edb969ee1647">CY_RTOS_GENERAL_ERROR</a>] </dd></dl>

</div>
</div>
<a id="gab7aac5b6be6876806aed8e18f43ccc7f" name="gab7aac5b6be6876806aed8e18f43ccc7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab7aac5b6be6876806aed8e18f43ccc7f">&#9670;&nbsp;</a></span>cy_rtos_timer_stop()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cy_rslt_t cy_rtos_timer_stop </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__abstraction__rtos__port.html#gacf9d99e8262de333b482417053756624">cy_timer_t</a> *&#160;</td>
          <td class="paramname"><em>timer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a request to stop the timer. </p>
<p >Depending on the priorities of threads in the system, it may be necessary for high priority items to wait before the timer is actually stopped.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">timer</td><td>Pointer to the timer handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the stop request. [<a class="el" href="group__group__abstraction__rtos__common.html#gaf58fac450d9fff4472f03ad68f6e546e">CY_RSLT_SUCCESS</a>, <a class="el" href="group__group__abstraction__rtos__common.html#ga89a0a071bd7a41b5d1f3edb969ee1647">CY_RTOS_GENERAL_ERROR</a>] </dd></dl>

</div>
</div>
<a id="ga7bf456853b8b353bf19977381377322b" name="ga7bf456853b8b353bf19977381377322b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7bf456853b8b353bf19977381377322b">&#9670;&nbsp;</a></span>cy_rtos_timer_is_running()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cy_rslt_t cy_rtos_timer_is_running </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__abstraction__rtos__port.html#gacf9d99e8262de333b482417053756624">cy_timer_t</a> *&#160;</td>
          <td class="paramname"><em>timer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool *&#160;</td>
          <td class="paramname"><em>state</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns state of a timer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">timer</td><td>Pointer to the timer handle </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">state</td><td>Return value for state, true if running, false otherwise</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the is_running request. [<a class="el" href="group__group__abstraction__rtos__common.html#gaf58fac450d9fff4472f03ad68f6e546e">CY_RSLT_SUCCESS</a>, <a class="el" href="group__group__abstraction__rtos__common.html#ga89a0a071bd7a41b5d1f3edb969ee1647">CY_RTOS_GENERAL_ERROR</a>] </dd></dl>

</div>
</div>
<a id="ga1c9db37ed530cce390d282e224d3b1bf" name="ga1c9db37ed530cce390d282e224d3b1bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1c9db37ed530cce390d282e224d3b1bf">&#9670;&nbsp;</a></span>cy_rtos_timer_deinit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cy_rslt_t cy_rtos_timer_deinit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__abstraction__rtos__port.html#gacf9d99e8262de333b482417053756624">cy_timer_t</a> *&#160;</td>
          <td class="paramname"><em>timer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Deinit the timer. </p>
<p >This function deinitializes the timer and frees all consumed resources.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">timer</td><td>Pointer to the timer handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the deinit request. [<a class="el" href="group__group__abstraction__rtos__common.html#gaf58fac450d9fff4472f03ad68f6e546e">CY_RSLT_SUCCESS</a>, <a class="el" href="group__group__abstraction__rtos__common.html#ga89a0a071bd7a41b5d1f3edb969ee1647">CY_RTOS_GENERAL_ERROR</a>] </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>(abstraction-rtos)</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
